using System.Collections.Generic;

namespace ColladaDotNet
{
	public partial class visual_scene : ColladaXmlNode
	{
		public override string GetId() { return id; }
		public override IList<ColladaXmlNode> ChildNodes
		{
			get
			{
				var list = new List<ColladaXmlNode>();
				if (node != null)
					foreach (object e in node) if (e is ColladaXmlNode) list.Add((ColladaXmlNode)e);
				if (evaluate_scene != null)
					foreach (object e in evaluate_scene) if (e is ColladaXmlNode) list.Add((ColladaXmlNode)e);
				if (extra != null)
					foreach (object e in extra) if (e is ColladaXmlNode) list.Add((ColladaXmlNode)e);
				if (asset != null)
					list.Add(asset);
				return list;
			}
		}

		public node CreateNode(string id,string name)
		{
			var res = new node();
			res.id = id;
			res.name = name;
			node = COLLADA.AddToArray(node, res);
			return res;
		}
	}
}
